package ar.edu.unq.persistencia.commands;

/**
 * TODO: description
 */
public class HqlCommand<T> extends ObtenerEntidadCommand<T> {
    public HqlCommand(final Class clazz) {
        super(clazz);
    }

    private String hql;

    public String getHql() {
        return this.hql;
    }

    public void setHql(final String hql) {
        this.hql = hql;
    }

    @Override
    @SuppressWarnings("unchecked")
    public void run() {

        this.setResult(this.getSession().createQuery(this.getHql()).list());

    }
}
